package com.dbky.alg.core;

import com.dbky.alg.core.properties.AlgSecurityProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
import org.springframework.security.crypto.password.PasswordEncoder;

/**
 * @Auther: tianchao
 * @Date: 2021/12/16 22:09
 * @Description:
 */
@Configuration
@EnableConfigurationProperties(AlgSecurityProperties.class)
public class SecurityCoreConfig {


    @Bean
    public PasswordEncoder passwordEncoder(){
        return new BCryptPasswordEncoder();
    }
}
